<%@ page import="cn.edu.zut.cs.Model.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<div class="layui-side layui-bg-black">
<%--    style="width: 13%;margin-left: 0px;--%>
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
<%--        <div style="align-content: center;width: 100%;">--%>
<%--            <img src="${urli}" id="gid" style="width: 80%;border: none;margin-left: 10px">--%>
<%--        </div>--%>
        <ul class="layui-nav layui-nav-tree" lay-filter="test">
            <li class="layui-nav-item ">
                <a class="" href="${path}/main">主页</a>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;">个人</a>
                <dl class="layui-nav-child">
                    <dd><a href="${path}/myroom?myname=${userInfo.username}">个人空间</a></dd>
                    <dd><a href="${path}/personpag">个人主页</a></dd>
                    <dd><a href="${path}/myinfo">帐户信息</a></dd>
                    <%--                    <dd><a href="${path}/personpage"></a></dd>--%>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">好友</a>
                <dl class="layui-nav-child">
                    <dd><a href="${path}/findfriend?username=${userInfo.username}">查找好友</a></dd>
                    <dd><a href="${path}/emps?pn=1">好友列表</a></dd>

                    <%--                    <dd><a href="${path}/firendspage">好友列表</a></dd>--%>
                </dl>
            </li>
<%--            <li class="layui-nav-item">
                <a href="javascript:;">设置</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;">特别关心</a></dd>
                    <dd><a href="javascript:;">好友</a></dd>
                    <dd><a href="">超链接</a></dd>
                </dl>
            </li>--%>
            <li class="layui-nav-item">
                <a href="#" onclick="f();">聊天</a>
                <script>
                    function f() {
                        var f ="${userInfo.nickname}";
                        alert("${userInfo}");
                        if(!f){
                            alert("请完善个人信息后，进入聊天功能！");
                        }
                        else{
                            window.location.href = "${path}/chat";
                        }
                    }

                </script>
            </li>
            <li class="layui-nav-item">
                <a href="${path}/outLogout" title="退出登录">
                    <i class="fa fa-fw fa-lg fa-power-off " style="font-size: 30px;"></i>
                </a>
            </li>
        </ul>
    </div>



</div>
<script src="${path}/layui/layui.js"></script>
<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            ,menuRight: function(){
                layer.open({
                    type: 1
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 5
                    ,shadeClose: true
                });
            }
        });

    });
</script>
<%--<script>--%>
<%--    $(function () {--%>
<%--        $("#gid").attr("src","${fileurl}");--%>
<%--    })--%>
<%--</script>--%>